package com.sfpay.api.internal.util;

import java.util.HashMap;
import java.util.Map;

/**
 * 类说明：<br>
 * 
 * <p>
 * 详细描述：<br>
 * 
 * </p>
 * <pre>
 * ——————————————————————————————————————————————————————————————————
 * |		修改人		|		修改时间			|		修改原因
 * ——————————————————————————————————————————————————————————————————
 * |	zengxx 曾宪新	|		2013-8-18		|	
 * ——————————————————————————————————————————————————————————————————
 * </pre>
 * 
 * @author zengxx 曾宪新(Xavier.zeng)
 * 
 * CreateDate: 2013-8-18
 */
public class RequestParametersHolder {

	/**
	 * 协议参数
	 */
	private SfpayHashMap protocalMustParams;
	
	/**
	 * 操作参数
	 */
	private SfpayHashMap protocalOptParams;
	
	/**
	 * 业务参数
	 */
	private SfpayHashMap applicationParams;

	public SfpayHashMap getProtocalMustParams() {
		return protocalMustParams;
	}

	public void setProtocalMustParams(SfpayHashMap protocalMustParams) {
		this.protocalMustParams = protocalMustParams;
	}

	public SfpayHashMap getProtocalOptParams() {
		return protocalOptParams;
	}

	public void setProtocalOptParams(SfpayHashMap protocalOptParams) {
		this.protocalOptParams = protocalOptParams;
	}

	public SfpayHashMap getApplicationParams() {
		return applicationParams;
	}

	public void setApplicationParams(SfpayHashMap applicationParams) {
		this.applicationParams = applicationParams;
	}

	public Map<String, String> getAllParams() {
		Map<String, String> params = new HashMap<String, String>();
		if (protocalMustParams != null && !protocalMustParams.isEmpty()) {
			params.putAll(protocalMustParams);
		}
		if (protocalOptParams != null && !protocalOptParams.isEmpty()) {
			params.putAll(protocalOptParams);
		}
		if (applicationParams != null && !applicationParams.isEmpty()) {
			params.putAll(applicationParams);
		}
		return params;
	}

}
